1. Technical Field
The present invention related generally to an improved data processing system and in particular to a method, apparatus, and computer implemented instructions for managing power resources in a data processing system. Still more particularly, the present invention provides a method, apparatus, and computer implemented instructions for power management in a data processing system based on processor utilization.
2. Description of Related Art
Computers have become pervasive in today""s society. Computers have become commonplace at work, at school, and at home. At work, computers are used for various tasks, such as word processing, spreadsheet generation, and presentations. In addition to workstations and personal computers, mobile computers, such as notebook computers and palmtop computers, are commonly used by users traveling from one place to another. Notebook computers often take the place of a desktop computer and allow a user to take work on trips, such as trips to customer sites. Notebook computers also are used as a means to allow a user to communicate with the office and exchange documents and other data while the user is outside of the office.
These mobile computers are powered by finite power sources, such as lithium batteries. Power management programs and systems allow the user to control power consumption in a mobile computer. Typically, more power is consumed with faster processor speeds. Additionally, more power is consumed as more devices are active on a mobile computer.
Presently, a user is able to optimize battery life by selecting a lower performance and lower power usage mode for a processor. The present invention recognizes that this approach does not take into the dynamic nature of a typical user""s usage of a computer. For example, a programmer spends a period of time editing a source file. Thereafter, the programmer compiles the program. Then, editing and debugging of the program occurs. This phase is typically accomplished using an interactive debug program with the user stepping through the compiled program using the debug program.
Editing a source file and editing and debugging a program does not require large amounts of processor resources, such as high processor speeds. A user perceives no performance degradation while typing characters even if the processor is slowed to the slowest possible speed for the processor.
On the other hand, compiling a program requires larger amounts of processor resources than typing characters on a computer. The processor speed may affect the compile time by minutes, depending on the amount of code compiled. With presently available approaches, a user is forced to choose between slow compile times and longer battery life versus fast compile times and shorter battery life, resulting from running the processor unnecessarily at high speeds when editing a file.
Therefore, it would be advantageous to have an improved method and apparatus for managing power usage in a computer based on processor utilization.
The present invention provides a method, apparatus, and computer implemented instructions in a data processing system for managing processor power usage. Current processor utilization is compared to current processor speed to form a comparison. Current processor speed is decreased in response to current processor speed being greater than the current processor utilization. Current processor speed is increased in response to processor speed being less than the current processor utilization in the comparison. In this manner processor speed is adjusted to meet the processor utilization. Thus, when less processor speed is needed the processor speed is lowered to reduce power usage.
In addition, power management may be based on particular programs executing on the data processing system. A program is identified in the data processing system to form an identified program. This identified program may be one that is being initialized for execution or currently executing. Power usage is set based on the identified program. User input may be used to select particular programs for power management.